home *** CD-ROM | disk | FTP | other *** search
- // Add watermark to activeDocument
-
- var docCount = documents.length;
-
- var docCount = documents.length;
-
- if (docCount == 0)
- {
- documents.add();
- }
-
- var docRef = documents[0];
- var destLayerRef = docRef.layers.add();
- destLayerRef.name = "Watermark";
-
- var textRef = destLayerRef.textArtItems.add();
- textRef.contents = "DRAFT";
- textRef.opacity = 42;
-
- var docHeight = docRef.height;
- var docWidth = docRef.width;
- textRef.height = docHeight/2;
- textRef.width = docWidth;
-
- textRef.rotate(45, undefined, undefined, undefined, undefined, Transformation.CENTER);
-
- textRef.width = docWidth;
- textRef.height = docHeight;
- textRef.position = [0, docHeight];
-
-
-